﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tradex.Market {

    /// <summary>
    /// The ActivityType defines the data embedded in a Activity. It only uses the 4 lower bits, so it can be combined
    /// with the ActivityFlags in one byte.
    /// </summary>
    public enum ActivityType : byte {

        /// <summary>
        /// The Activity contains a trade at the given price. This normally should include the volume of the trade.
        /// </summary>
        Trade = 0x00,

        /// <summary>
        /// The Activity contains the volume total of the session so far. It follows a Trade
        /// Activity and reports no price, but the total volume of the session so far.
        /// </summary>
        Volume = 0x01,

        /// <summary>
        /// The Activity contains a change in the best ask. It contains the price of the Ask, and the available volume.
        /// </summary>
        BestAsk = 0x02,

        /// <summary>
        /// The Activity contains a change in the best bid. It contains the price of the bid, and the available volume.
        /// </summary>
        BestBid = 0x03,

        /// <summary>
        /// The Activity contains a bid. This is used for Level 2 where the depth of the market is transmitted. It contains
        /// the price of the Bid, as well as the available volume.
        /// </summary>
        Bid = 0x04,

        /// <summary>
        /// The Activity contains an ask. This is used for Level 2 where the depth of the market is transmitted. It contains
        /// the price of the Ask, as well as the available volume.
        /// </summary>
        Ask = 0x05,

        /// <summary>
        /// The Activity contains the open price of the current session so far.
        /// </summary>
        Open = 0x08,

        /// <summary>
        /// The Activity contains the high price of the current session so far.
        /// </summary>
        High = 0x09,

        /// <summary>
        /// The Activity contains the low price of the current session.
        /// </summary>
        Low = 0x0a,

        /// <summary>
        /// The Activity contains the close price of the last active session.
        /// </summary>
        Close = 0x0b,

        /// <summary>
        /// This is a closing price indication, sometimes (mostly in pit sessions) given before the close to give people an
        /// indication where the closing price will likely be.
        /// </summary>
        Closing = 0x0c,

        /// <summary>
        /// This is an opening price indication, sometimes 8mostly in pit sessions) given as a pre-market indication where the open
        /// will likely be.
        /// </summary>
        Opening = 0x0d,

        /// <summary>
        /// This contains the official settlement price. This may be different from the closing price under special condtions.
        /// </summary>
        Settlement = 0x0e,

        /// <summary>
        /// This Activity defines a market mode. There is no proce data involved,
        /// but the mode parameter has the new working mode of the market (such as
        /// that the market closed, or oopened, or trading is suspended).
        /// </summary>
        Mode = 0x0f,

    }
}
